//
//  LeftTableViewCell.m
//  Linkage
//
//  Created by LeeJay on 16/8/22.
//  Copyright © 2016年 LeeJay. All rights reserved.
//

#import "LeftTableViewCell.h"

#define defaultColor rgba(253, 212, 49, 1)

@interface LeftTableViewCell ()

 

@end

@implementation LeftTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor clearColor];
        
        self.name = [UILabel new];
        self.name.numberOfLines = 0;
        self.name.font = DYFont(16);
        self.name.textAlignment = NSTextAlignmentCenter;
        self.name.textColor = KBlackColor;
        self.name.highlightedTextColor = CNavBgColor;
        [self.contentView addSubview:self.name];
        [_name mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).mas_offset(15);
            make.right.equalTo(self.contentView).mas_offset(-10);
            make.left.equalTo(self.contentView).mas_offset(10);
            make.bottom.equalTo(self.contentView).mas_offset(-15);
        }];
    }
    return self;
}
 

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state

    self.contentView.backgroundColor = selected ? KWhiteColor : KHexColor(@"F7F7F7");
    self.highlighted = selected;
    self.name.highlighted = selected;
 }

@end
